package com.flower.enjoyment.flower.service;

import com.flower.enjoyment.flower.entity.OrderInfo;
import com.flower.enjoyment.flower.entity.UserInfo;
import com.flower.enjoyment.flower.entityDo.PresentDetailDo;
import com.flower.enjoyment.flower.entityDo.UserInfoDo;

import java.util.List;

public interface UserInfoService {
    /**
     * 根据openID获取用户信息
     * @param openId
     * @return
     */
    UserInfoDo selectByOpenId(String openId);

    /**
     * 根据id获取用户信息
     * @param id
     * @return
     */
    UserInfoDo selectById(String id);

    /**
     * 更新用户信息
     * @param user
     * @return
     */
    int updateById(UserInfo user);

    /**
     * 添加用户信息
     * @param user
     * @return
     */
    int insert(UserInfo user);

    int updateUserOrderInfo(UserInfoDo userInfoDo, OrderInfo orderInfo, PresentDetailDo presentDetailDo);

    List<UserInfoDo> selectListBySourceUserId(String sourceUserId);

    int updateTodayIncome();

}
